﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using VideoClub.DS.classes.vw;
using VideoClub.EN.classes;
namespace VideoClub.BS.classes
{
   public class Bs_Vws
    {
        Sp_Vw_Handler spvistahandler = new Sp_Vw_Handler();
        public bool selectMoviesByCategory(CategoriaPelicula categoriapelicula,ref DataSet respuesta, ref string log)
        {
            try
            {
                if (categoriapelicula.Idcategoriapelicula < 0)
                {
                    throw new Exception("Id mal indicado");
                }
                spvistahandler.selectMoviesByCategory(categoriapelicula,ref  respuesta, ref log);
                return true;
            }

            catch (Exception ex)
            {
                log += ex.Message + ex.StackTrace + ex.Source;
                throw ex;
            }
        }

        public bool selectDetailedMovie(Pelicula pelicula, ref DataSet respuesta, ref string log)
        {
            try
            {
                if (pelicula.Idpelicula < 0)
                {
                    throw new Exception("Id mal indicado");
                }
                spvistahandler.selectDetailedMovie(pelicula, ref  respuesta, ref log);
                return true;
            }

            catch (Exception ex)
            {
                log += ex.Message + ex.StackTrace + ex.Source;
                throw ex;
            }
        }      
    }
}
